package com.puzzud.engine.video;

import com.puzzud.engine.video.VideoObject2D;

// MoveableObject2D
public abstract class VideoObject2DMoveable extends VideoObject2D
{
	protected int xVelocity;
	protected int yVelocity;
	
	public VideoObject2DMoveable()
	{
		super();
		
		setVelocity( 0, 0 );
	}
	
	public void setXVelocity( int xv )
	{
		xVelocity = xv;
	}
	
	public void setYVelocity( int yv )
	{
		yVelocity = yv;
	}
	
	public void setVelocity( int xv, int yv )
	{
		setXVelocity( xv );
		setYVelocity( yv );
	}
	
	public int getXVelocity()
	{
		return( xVelocity );
	}
	
	public int getYVelocity()
	{
		return( yVelocity );
	}
	
	public void move()
        {
            setPosition( getXPosition() + xVelocity, getYPosition() + yVelocity );
	}
	
	public void stop()
	{
		setVelocity( 0, 0 );
	}
	
	protected abstract void setRealDimensions( int width, int height );
	
	abstract int getRealWidth();
	abstract int getRealHeight();
}